package com.congee02.dbservlet.framework.orm;

final class GetterSetterUtils {

    private GetterSetterUtils() {}

    /**
     * 获取 getter 和 setter 方法名后缀
     * @param fieldName 字段名
     */
    static String getterSetterSuffix(String fieldName) {
        if (fieldName.length() == 1) {
            return fieldName.substring(0, 1).toUpperCase();
        }
        if (fieldName.charAt(1) >= 'A' && fieldName.charAt(1) <= 'Z') {
            return fieldName;
        }
        return fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
    }

}
